package avatar;

import com.game.majiang.Event.Time.TimeEvent;
import com.game.majiang.Event.Time.TimeListener;
import com.game.majiang.Event.Time.TimeManager;
import com.game.majiang.algorithm.MathHelper;

public abstract class pandora{
	public static int state_nologin = 0;
	public static int state_login = 1;
	public pandora()
	{
		init();
	}	
	public int loginstate = 0;
	
	public boolean isthinklogintime = true;
	public int thinklogintime = 10;
	public int thinklogintimede = 10;

	public boolean isthinklogouttime = false;
	public int thinklogouttime = 7200;
	public int thinklogouttimede = 7200;

	public boolean isthinkentergametime = true;
	public int thinkentergametime = 60;
	public int thinkentergametimede = 60;

	public boolean isthinkleavegametime = true;
	public int thinkleavegametime = 10800;
	public int thinkleavegametimede = 10800;

	public boolean isthinksetdowntime = true;
	public int thinksetdowntime = 5;
	public int thinksetdowntimede = 5;

	public boolean isthinksetuptime = false;
	public int thinksetuptime = 600;
	public int thinksetuptimede = 600;

	public boolean isthinkliuzuotime = false;
	public int thinkliuzuotime = 600;
	public int thinkliuzuotimede = 600;

	public boolean isthinkhuizuotime = true;
	public int thinkhuizuotime = 30;
	public int thinkhuizuotimede = 30;

	public boolean isthinksetjifenkutime = true;
	public int thinksetjifenkutime = 10;
	public int thinksetjifenkutimede = 10;

	public boolean isthinksetjifenpaitime = true;
	public int thinksetjifenpaitime = 10;
	public int thinksetjifenpaitimede = 10;

	public boolean isthinkdiutime = true;
	public int thinkdiutime = 10;
	public int thinkdiutimede = 10;

	public boolean isthinkxiutime = true;
	public int thinkxiutime = 2;
	public int thinkxiutimede = 2;

	public boolean isthinkqiaotime = true;
	public int thinkqiaotime = 9;
	public int thinkqiaotimede = 9;

	public boolean isthinkdatime = true;
	public int thinkdatime = 8;
	public int thinkdatimede = 8;

	public boolean isthinktuotime = false;
	public int thinktuotime = 7;
	public int thinktuotimede = 7;

	public boolean isthinkgentime = true;
	public int thinkgentime = 2;
	public int thinkgentimede = 2;

	public boolean isthinkyanshitime = false;
	public int thinkyanshitime = 10;
	public int thinkyanshitimede = 10;

	public boolean isthinkqiepaitime = true;
	public int thinkqiepaitime = 30;
	public int thinkqiepaitimede = 30;

	public boolean isthinkbiaoqingtime = true;
	public int thinkbiaoqingtime = 30;
	public int thinkbiaoqingtimede = 30;

	public boolean isthinkaddgoldtime = true;
	public int thinkaddgoldtime = 60;
	public int thinkaddgoldtimede = 60;

	public boolean isthinkadddiamondstime = true;
	public int thinkadddiamondstime = 60;
	public int thinkadddiamondstimede = 60;

	public boolean isthinkzupaitime = true;
	public int thinkzupaitime = 60;
	public int thinkzupaitimede = 60;

	public boolean isthinkyaopaitime = true;
	public int thinkyaopaitime = 10;
	public int thinkyaopaitimede = 10;
	
	public void init()
	{
		thinklogintimede = MathHelper.Random2(10, 60);
		thinklogouttimede = MathHelper.Random2(10000, 20000);
		thinkentergametimede = MathHelper.Random2(10, 300);
		thinkleavegametimede = MathHelper.Random2(30, 120);
		thinksetdowntimede = MathHelper.Random2(2, 10);
		thinksetuptimede = MathHelper.Random2(600, 1200);
		thinkliuzuotimede = MathHelper.Random2(600, 1200);
		thinkhuizuotimede = MathHelper.Random2(10, 30);
		thinksetjifenkutimede = MathHelper.Random2(5, 15);
		thinksetjifenpaitimede = MathHelper.Random2(5, 15);
		thinkdiutimede = MathHelper.Random2(2, 5);
		thinkxiutimede = MathHelper.Random2(2, 5);
		thinkqiaotimede = MathHelper.Random2(4, 7);
		thinkdatimede = MathHelper.Random2(3, 6);
		thinktuotimede = MathHelper.Random2(3, 6);
		thinkgentimede = MathHelper.Random2(3, 6);
		thinkyanshitimede = MathHelper.Random2(10, 15);
		thinkqiepaitimede = MathHelper.Random2(30, 60);
		thinkbiaoqingtimede = MathHelper.Random2(60, 120);
		thinkaddgoldtimede = MathHelper.Random2(10, 20);
		thinkadddiamondstimede = MathHelper.Random2(10, 20);
		thinkzupaitimede = MathHelper.Random2(3, 15);
		thinkyaopaitimede = MathHelper.Random2(5, 10);
		thinklogintime = thinklogintimede;
		thinklogouttime = thinklogouttimede;
		thinkentergametime = thinkentergametimede;
		thinkleavegametime = thinkleavegametimede;
		thinksetdowntime = thinksetdowntimede;
		thinksetuptime = thinksetuptimede;
		thinkliuzuotime = thinkliuzuotimede;
		thinkhuizuotime = thinkhuizuotimede;
		thinksetjifenkutime = thinksetjifenkutimede;
		thinksetjifenpaitime = thinksetjifenpaitimede;
		thinkdiutime = thinkdiutimede;
		thinkxiutime = thinkxiutimede;
		thinkqiaotime = thinkqiaotimede;
		thinkdatime = thinkdatimede;
		thinktuotime = thinktuotimede;
		thinkgentime = thinkgentimede;
		thinkyanshitime = thinkyanshitimede;
		thinkqiepaitime = thinkqiepaitimede;
		thinkbiaoqingtime = thinkbiaoqingtimede;
		thinkaddgoldtime = thinkaddgoldtimede;
		thinkadddiamondstime = thinkadddiamondstimede;
		thinkzupaitime = thinkzupaitimede;
		thinkyaopaitime = thinkyaopaitimede;
	}
	public void timeEvent() {
		// TODO Auto-generated method stub
		if(isthinklogintime)
		{
			thinklogintime--;
			if(thinklogintime <= 0)
			{
				thinklogintime = thinklogintimede;
				thinklogin();
			}
		}
		if(isthinklogouttime)
		{
			thinklogouttime--;
			if(thinklogouttime <= 0)
			{
				thinklogouttime = thinklogouttimede;
				thinklogout();
			}
		}
		if(isthinkentergametime)
		{
			thinkentergametime--;
			if(thinkentergametime <= 0)
			{
				thinkentergametime = thinkentergametimede;
				thinkentergame();
			}
		}
		if(isthinkleavegametime)
		{
			thinkleavegametime--;
			if(thinkleavegametime <= 0)
			{
				thinkleavegametime = thinkleavegametimede;
				thinkleavegame();
			}
		}
		if(isthinksetdowntime)
		{
			thinksetdowntime--;
			if(thinksetdowntime <= 0)
			{
				thinksetdowntime = thinksetdowntimede;
				thinksetdown();
			}
		}
		if(isthinksetuptime)
		{
			thinksetuptime--;
			if(thinksetuptime <= 0)
			{
				thinksetuptime = thinksetuptimede;
				thinksetup();
			}
		}
		if(isthinkliuzuotime)
		{
			thinkliuzuotime--;
			if(thinkliuzuotime <= 0)
			{
				thinkliuzuotime = thinkliuzuotimede;
				thinkliuzuo();
			}
		}
		if(isthinkhuizuotime)
		{
			thinkhuizuotime--;
			if(thinkhuizuotime <= 0)
			{
				thinkhuizuotime = thinkhuizuotimede;
				thinkhuizuo();
			}
		}
		if(isthinksetjifenkutime)
		{
			thinksetjifenkutime--;
			if(thinksetjifenkutime <= 0)
			{
				thinksetjifenkutime = thinksetjifenkutimede;
				thinksetjifenku();
			}
		}
		if(isthinksetjifenpaitime)
		{
			thinksetjifenpaitime--;
			if(thinksetjifenpaitime <= 0)
			{
				thinksetjifenpaitime = thinksetjifenpaitimede;
				thinksetjifenpai();
			}
		}
		if(isthinkdiutime)
		{
			thinkdiutime--;
			if(thinkdiutime <= 0)
			{
				thinkdiutime = thinkdiutimede;
				thinkdiu();
			}
		}
		if(isthinkxiutime)
		{
			thinkxiutime--;
			if(thinkxiutime <= 0)
			{
				thinkxiutime = thinkxiutimede;
				thinkxiu();
			}
		}
		if(isthinkqiaotime)
		{
			thinkqiaotime--;
			if(thinkqiaotime <= 0)
			{
				thinkqiaotime = thinkqiaotimede;
				thinkqiao();
			}
		}
		if(isthinkdatime)
		{
			thinkdatime--;
			if(thinkdatime <= 0)
			{
				thinkdatime = thinkdatimede;
				thinkda();
			}
		}
		if(isthinktuotime)
		{
			thinktuotime--;
			if(thinktuotime <= 0)
			{
				thinktuotime = thinktuotimede;
				thinktuo();
			}
		}
		if(isthinkgentime)
		{
			thinkgentime--;
			if(thinkgentime <= 0)
			{
				thinkgentime = thinkgentimede;
				thinkgen();
			}
		}
		if(isthinkyanshitime)
		{
			thinkyanshitime--;
			if(thinkyanshitime <= 0)
			{
				thinkyanshitime = thinkyanshitimede;
				thinkyanshi();
			}
		}
		if(isthinkqiepaitime)
		{
			thinkqiepaitime--;
			if(thinkqiepaitime <= 0)
			{
				thinkqiepaitime = thinkqiepaitimede;
				thinkqiepai();
			}
		}
		if(isthinkbiaoqingtime)
		{
			thinkbiaoqingtime--;
			if(thinkbiaoqingtime <= 0)
			{
				thinkbiaoqingtime = thinkbiaoqingtimede;
				thinkbiaoqing();
			}
		}
		if(isthinkaddgoldtime)
		{
			thinkaddgoldtime--;
			if(thinkaddgoldtime <= 0)
			{
				thinkaddgoldtime = thinkaddgoldtimede;
				thinkaddgold();
			}
		}
		if(isthinkadddiamondstime)
		{
			thinkadddiamondstime--;
			if(thinkadddiamondstime <= 0)
			{
				thinkadddiamondstime = thinkadddiamondstimede;
				thinkadddiamonds();
			}
		}
		if(isthinkzupaitime)
		{
			thinkzupaitime--;
			if(thinkzupaitime <= 0)
			{
				thinkzupaitime = thinkzupaitimede;
				thinkzupai();
			}
		}
		if(isthinkyaopaitime)
		{
			thinkyaopaitime--;
			if(thinkyaopaitime <= 0)
			{
				thinkyaopaitime = thinkyaopaitimede;
				thinkyaopai();
			}
		}
	}
	public abstract void thinklogin();
	public abstract void thinklogout();
	public abstract void thinkentergame();
	public abstract void thinkleavegame();
	public abstract void thinksetdown();
	public abstract void thinksetup();
	public abstract void thinkliuzuo();
	public abstract void thinkhuizuo();
	public abstract void thinksetjifenku();
	public abstract void thinksetjifenpai();
	public abstract void thinkdiu();
	public abstract void thinkxiu();
	public abstract void thinkqiao();
	public abstract void thinkda();
	public abstract void thinktuo();
	public abstract void thinkgen();
	public abstract void thinkyanshi();
	public abstract void thinkqiepai();
	public abstract void thinkbiaoqing();
	public abstract void thinkaddgold();
	public abstract void thinkadddiamonds();
	public abstract void thinkzupai();
	public abstract void thinkyaopai();

}
